Motion compensation method, picture coding method and picture decoding method

ABSTRACT

The picture coding apparatus ( 300 ) includes a motion vector estimation unit ( 302 ) that select one of methods for deriving a motion vector of a block to be motion-compensated, depending on a motion vector of a block located in a corner of a decoded macroblock among a group of blocks that compose the decoded macroblock corresponding to the current macroblock to be coded and determines the motion vector derived by the selected method for derivation to be a candidate of the motion vector of the current macroblock to be coded and a motion compensation unit ( 303 ) that generates a predictive image of the block to be motion-compensated based on the estimated motion vector.

TECHNICAL FIELD

The present invention relates to a motion compensation method usingmotion vectors and picture coding and decoding methods using the motioncompensation method.

BACKGROUND ART

In recent years, accompanied by the development of multimediaapplications, it is becoming general to deal with uniformly entire mediainformation such as a picture, a voice and a text. At this time, it ispossible to deal with the media uniformly by digitizing entire media.However, the digitized picture has extremely large amount of data andtherefore technology for compressing information of a picture isindispensable. On the other hand, it is also important to standardizecompression technology to interoperate compressed picture data. Asstandards of picture compression technology, there are H. 261 and H. 263of ITU-T (International Telecommunication Standardization Section), MPEG(Moving Picture Experts Group)-1, MPEG-2, MPEG-4 and the like of ISO/IEC(International Standardization Organization/InternationalElectrotechnical Commission).

Generally, information volume is compressed by reducing redundancy intemporal and spatial directions of moving picture coding. Therefore, forinter picture prediction coding aimed at reducing a temporal redundancy,motion estimation and generation of a predictive picture are performedon a biock-by-biock basis referring to a preceding picture and afollowing picture, and a coding is performed for a difference valuebetween an obtained predictive image and an image of a currentmacroblock to be coded. Here, a picture is a term to represent onescreen; it means a frame in a progressive picture and a frame or a fieldin an interlace picture. Here, an interlace picture is a picture inwhich one frame is formed with two fields with different time. In codingand decoding process of an interlace picture, it is possible to processone frame as a frame “as is” or two fields. Also it is possible toprocess one frame structure or one field structure for each block in theframe.

A picture that does not have a reference picture and in which intrapicture prediction coding is performed is called an I picture.Additionally, a picture in which only one picture is referred and interpicture prediction coding is performed is called a P picture. Moreover,a picture in which two pictures are referred at the one time and interpicture coding can be performed is called a B picture. In a B picture,two pictures can be referred as an arbitrary combination from forwardpictures or backward pictures in display order. It is possible to selectappropriate reference pictures for each block that is a basic unit forcoding and decoding. Two reference pictures are distinguished: areference picture that is described earlier in a coded bit stream is thefirst reference picture and a reference picture that is described laterin the coded bit stream is the second reference picture. But it isnecessary that the reference pictures are already coded or decoded as acondition in the case of coding and decoding these pictures.

To code a P picture or a B picture, inter picture prediction codingusing motion compensation is used. The inter picture prediction codingusing motion compensation is a coding method in which motioncompensation is applied to inter picture prediction. Motion compensationis a method that does not simply perform prediction based on pixelvalues of a block in a reference frame co-located with a current blockbut estimates motion amount (hereinafter, this is called a “motionvector”.) of each part and performs prediction considering said motionamount to improve predictive accuracy and reduce data amount. Forexample, estimating a motion vector of a current picture to be coded,obtaining a predictive value that has been shifted by the amount of themotion vector and coding predictive residual that is the differencebetween the predictive value and a pixel value of each pixel in thecurrent picture to be coded, successfully reduce the data amount. In thecase of this method, information of a motion vector is necessary at thetime of decoding and therefore the motion vector is also coded andrecorded or transmitted.

The motion vector is estimated on a block-by-block basis, the blockshaving a predetermined size. Concretely, the motion vector is estimatedby moving each block in a reference picture corresponding to each blockin a current picture to be coded in a search area and by detecting thelocation of the reference block that is most similar to the currentblock to be coded.

FIG. 1 is a block diagram showing the structure of a conventionalpicture coding apparatus 100. The picture coding apparatus 100 includesa difference unit 101, an image coding unit 102, a variable lengthcoding unit 103, an image decoding unit 104, an addition unit 105, apicture memory 106, a picture memory 107, a motion compensation unit108, a motion vector estimation unit 109 and a motion vector storageunit 110. Here, as a block size for motion compensation, an appropriatesize is selected on a macroblock-by-macroblock basis from seven blocksizes and used for coding and decoding, the seven block sizes being 4×4pixels, 4×8 pixels, 8×4 pixels, 8×8 pixels, 8×16 pixels, 16×8 pixels and16×16 pixels according to ITU-T H.26L TML8, which is currently understandardization.

The picture memory 107 stores image data “Img” that represents movingpictures inputted in the display order on a picture-by-picture basis.The difference unit 101 calculates the difference between the image data“Img” read out from the picture memory 107 and predictive image data“Pred” inputted from the motion compensation unit 108 and generatespredictive residual image data “Res”. The image coding unit 102 performscoding processes such as frequency conversion and quantization to theinputted predictive residual image data “Res” and generates codedresidual data “CodedRes”. In the case of intra picture coding, interpicture motion compensation is not performed and therefore the value ofthe predictive image data “Pred” is thought to be “0”.

The motion vector estimation unit 109 estimates the motion vector thatshows the location predicted to be optimum in the search area in thereference picture that is reference picture data Ref, which is codeddecoding picture data stored in the picture memory 106 and outputs amotion parameter “MontionParam” that represents the estimated motionvector. In addition, at that time, the motion vector estimation unit 109switches reference pictures according to whether a current picture to becoded is a P picture or a B picture. Coding mode “Mod” shows in whichway (for example, which one of a bi-predictive mode, a unidirectionalmode and a direct mode) motion compensation is performed. For example,in the direct mode, the motion vector estimation unit 109 calculatesbi-predictive motion vectors of said current block to bemotion-compensated by using a motion vector derived from another block.Here, a picture referred to derive a motion vector in the direct mode iscalled a standard picture and a block in the standard picture co-locatedwith the current block is called a standard block. In this case, valuesof motion vectors in the direct mode are calculated with a 16×16-pixelmacroblock as the unit regardless of the block size that is actually theunit for motion compensation and the calculated motion vectors are notcoded. Then, the motion vector estimation unit 109 chooses either thecalculated motion vector or the motion vector (0, 0) to be used for each4×4-pixel block. The motion compensation unit 108 generates thepredictive image data “Pred” based on the coding mode “Mod” of thecurrent block to be coded and the motion vectors estimated by the motionvector estimation unit 109.

Further, when a motion vector indicates sub-pixel locations such as ahalf pixel and a quarter pixel, the motion compensation unit 108interpolates pixel values of the sub-pixel locations such as a halfpixel and a quarter pixel by using a low-pass filter and the like. Themotion vector storage unit 110 stores motion parameters “MotionParam”outputted from the motion vector estimation unit 109. The variablelength coding unit 103 performs variable length coding and the like tothe inputted coded residual data “CodedRes” and the motion parameters“MotionParam” outputted from the motion vector estimation unit 109 andgenerates coded data “Bitstream” by further adding the coding mode“Mod”.

The image decoding unit 104 performs decoding processes such as inversequantization and inverse frequency conversion to the inputted codedresidual data “CodedRes” and generates decoded residual data “ReconRes”.The addition unit 105 adds the decoded residual data “ReconRes”outputted from the image decoding unit 104 to the predictive image data“Pred” inputted from the motion compensation unit 108 and generatesdecoded image data “Recon”. The picture memory 106 stores the generateddecoded image data “Recon”.

When the motion amount of a photogenic subject is smaller than aninteger pixel unit, predictive effect may enhance if the prediction isperformed with a movement that is smaller than the integer pixel unit.Generally, pixel interpolation is used when calculating pixel values ofa predictive image with the movement that is smaller than the integerpixel unit. This pixel interpolation is performed by filtering pixelvalues of a reference picture with a linear filter (a low-pass filter).When increasing the number of taps of this linear filter, it is easierto realize a filter with good frequency characteristics and thereforethe predictive effect enhances but processing amount increases. On theother hand, when the number of taps of this linear filter is small, thefrequency characteristics become worse and therefore the predictiveeffect deteriorates but the processing amount decreases.

FIG. 2 is a diagram showing the structure of a conventional picturedecoding apparatus 200 that performs pixel interpolation. The picturedecoding apparatus 200 includes a variable length decoding unit 201, animage decoding unit 202, an addition unit 203, a picture memory 204, amotion vector storage unit 205 and a motion compensation unit 206.

The variable length decoding unit 201 extracts various data such as thecoded residual data “CodedRes”, motion parameters “MotionParam” andinformation of the coding mode “Mod” at the time of coding from theinputted coded data “Bitstream”. The image decoding unit 202 decodes theinputted coded residual data “CodedRes” and generates predictiveresidual image data “Res”. The motion vector storage unit 205 stores themotion parameters “MotionParam” extracted by the variable lengthdecoding unit 201. The motion compensation unit 206 includes inside apixel interpolation unit not illustrated that interpolates pixel valuesof the sub-pixel locations such as a half pixel and a quarter pixel byusing a linear filter and the like, and generates the predictive imagedata “Pred” that is motion compensation data from the decoded image data“Recon” in the picture memory 204 based on the coding mode “Mod” at thetime of coding, motion parameters “MotionParam” and the like. At thistime, in the case of the direct mode, the motion compensation unit 206generates the predictive image data “Pred” of the current block to bemotion-compensated in the same size with the block size of motioncompensation of a standard block in a standard picture, read out fromthe picture memory 204. The addition unit 203 adds the predictiveresidual image data “Res” outputted from the image decoding unit 202 tothe predictive image data “Pred” that is motion compensation dataoutputted from the motion compensation unit 206 and generates thedecoded image data “Recon”. The picture memory 204 stores the generateddecoded image data “Recon”.

Refer to MPEG-4 Visual written standards (1999, ISO/IEC 14496-2: 1999Information technology-Coding of audio-visual objects-Part2: Visual)

To perform motion compensation of sub-pixel precision, however, it isnecessary to obtain pixel values of not only the current block to bemotion-compensated but also some adjacent pixels. In other words, togenerate pixel values of sub-pixel precision, it is necessary to obtainthe pixel values of a larger area than the actual block to be predicted.It is common practice to use a low-pass filter in order to generatepixel values by interpolation process; it is necessary to access (readout) some adjacent pixels (pixels for a number of coefficients of thelow-pass filter) to a target pixel in order to use the low-pass filter.FIGS. 3A and 3B are diagrams showing examples of a current block to bemotion-compensated and its adjacent pixels, whose pixel values arenecessary to be read out in order to generate a predictive image whenperforming pixel interpolation. FIG. 3A is a diagram showing the currentblock to be motion-compensated and its adjacent pixels when the currentblock to be motion-compensated is small. FIG. 3B is a diagram showingthe current block to be motion-compensated and its adjacent pixels whenthe current block to be motion-compensated is large. In FIGS. 3A and 3B,the central square shows one current block to be motion-compensatedwhile the surrounding hatched area shows the adjacent pixels whose pixelvalues are read out from a reference memory in order to perform pixelinterpolation. Here, for example, when a filter of 9 taps (pixel valuesof nine pixels are necessary) is assumed to be used as a low-passfilter, in order to perform low-pass filter process to pixels in theborder area of the block, it is necessary to obtain the pixel values ofat least four pixels outside the block and therefore a memory must beaccessed to read out the area including the pixel values of four pixelssurrounding the central current block to be motion-compensated. Forexample, in a 4×4-pixel block, it is necessary to read out the pixelvalues of (4+4+4)×(4+4+4)=144 pixels for each block. In an 8×8-pixelblock, it is necessary to read out the pixel values of(4+8+4)×(4+8+4)=256 pixels. When motion-compensating a 16×16-pixelmacroblock with an 8×8-pixel block as the unit, it is enough to read outthe pixel values of 256 pixels×4=1024 pixels but whenmotion-compensating the 16×16-pixel macroblock with a 4×4-pixel block asthe unit, it is necessary to read out the pixel values of 144pixels×16=2304 pixels. Consequently, the memory access amount of themotion compensation with an 8×8-pixel block as the unit is about half ofthat of four motion compensations with a 4×4-pixel block as the unit.

As is apparent from the above-mentioned example, when reading out thepixel values of the same number of external pixels surrounding onecurrent block to be motion-compensated, the smaller the size of thecurrent block to be motion-compensated, the larger the ratio of thenumber of pixels in adjacent blocks to the number of pixels in thecurrent block to be motion-compensated, concerning the number of pixelsread out from a reference memory. As a result, when reading out thepixel values of the current block to be motion-compensated from thereference memory, there is a problem that the load of memory access(access for reading out) becomes large by referring to the adjacentpixels that are not the target of motion compensation. Particularly,when performing the bi-predictive motion compensation of a B picturewhose pixel values are calculated by motion-compensating the currentpicture to be coded or decoded referring to two pictures at the sametime, the access to the reference memory becomes about twice comparedwith unidirectional predictive motion compensation. Therefore, a problemof overhead becomes more prominent when the size of the current block tobe motion-compensated is small.

DISCLOSURE OF INVENTION

It is the first object of the present invention to provide a motioncompensation method for reducing the access to the reference memory.

Additionally, it is the second object of the present invention toprovide a picture coding method and a picture decoding method using themotion compensation method.

To achieve the above-mentioned objects, the motion compensation methodaccording to the present invention is a motion compensation method forcoding or decoding an image signal, the motion compensation methodcomprising: a selection step of selecting one of methods for generatinga motion vector of a block in a current macroblock to be coded ordecoded, depending on a motion vector of a block located in a corner ofa coded or decoded macroblock among a group of blocks that compose thecoded or decoded macroblock corresponding to the current macroblock; anda motion compensation step of generating a predictive image of the blockin the current macroblock based on the motion vector generated by theselected method. Herewith, though a group of coded or decoded blocksthat compose a plurality of blocks corresponding to one current block tobe motion-compensated, by judging motion of one block located in thefour corners of the macroblock including said group of blocks, it ispossible to select a method for generating a motion vector used tomotion-compensate the current block to be motion-compensated.

Moreover, since the picture coding apparatus and the picture decodingapparatus motion-compensate with a larger size of the current block tobe motion-compensated as the unit, it is possible, for example, toreduce the overhead by access to a picture memory in coding and decodinga B picture using the bi-predictive motion compensation.

In addition, the present invention can be realized not only as themotion compensation method, the picture coding method and the picturedecoding method like this but also as the picture coding apparatus andthe picture decoding apparatus using the characteristic steps includedin the these methods as means, and as a program for causing a computerto execute these steps. Additionally, it is needless to say that theprogram can be distributed through a recording medium such as a CD-ROMand a transmission medium such as Internet.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing the structure of a conventionalpicture coding apparatus 100.

FIG. 2 is a diagram showing the structure of a conventional picturedecoding apparatus 200 that performs pixel interpolation.

FIGS. 3A and 3B are diagrams showing examples of a current block to bemotion-compensated and its adjacent pixels, which are necessary to readout the pixel values of which in order to generate a predictive imagewhen performing pixel interpolation.

FIG. 4 is a diagram showing the structure of a picture coding apparatus300 according to one embodiment using the picture coding methodaccording to the present invention.

FIG. 5 is a block diagram showing the structure of a picture decodingapparatus 400 according to one embodiment using the picture decodingmethod according to the present invention.

FIG. 6A is a diagram showing a method for determining the motion vectorMV of the current macroblock to be coded or decoded using motion vectorsin the adjacent blocks when the adjacent blocks are motion-compensatedin the same block size as the current macroblock to be coded or decoded.

FIG. 6B is a diagram showing the correspondence between the currentblock to be motion-compensated and a block in a subsequent picture whichis co-located with the current block when the current macroblock to becoded or decoded and the block in a subsequent picture which isco-located with a current block are motion-compensated in the same blocksize.

FIG. 7 is a diagram showing a method for determining the motion vectorof the macroblock to be coded or decoded using motion vectors ofadjacent blocks when the adjacent blocks are motion-compensated in asmaller block size than the current block to be coded or decoded.

FIG. 8 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded anda macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with the same block size.

FIG. 9 is a diagram showing the correspondence between the current blockto be motion-compensated and the plurality of blocks in a subsequentpicture which is co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated in different block sizes.

FIG. 10 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.

FIG. 11 is a diagram showing the correspondence between the currentblock to be motion-compensated and the plurality of blocks in asubsequent picture which are co-located with the current macroblock tobe motion-compensated when the current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with acurrent block are motion-compensated in different block sizes in theSecond Embodiment.

FIG. 12 is a flowchart showing a process in the Second Embodiment formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when the current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.

FIG. 13A shows an example of a physical format of the flexible disk as amain body of a storing medium.

FIG. 13B shows a full appearance of a flexible disk, its structure atcross section and the flexible disk itself.

FIG. 13C shows a structure for recording and reading out the program onthe flexible disk FD.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing content distribution service.

FIG. 15 is a diagram showing the cell phone ex115 using the picturecoding method and the picture decoding method explained in theabove-mentioned embodiments.

FIG. 16 is a diagram showing a structure of a cell phone.

FIG. 17 is a diagram showing an example of a digital broadcastingsystem.

BEST MODE FOR CARRYING OUT THE INVENTION

The embodiments of the present invention will be explained in detailbelow with reference to FIGS. 4 to 17.

(The First Embodiment)

The first embodiment of the present invention will be explained indetail below with reference to figures.

FIG. 4 is a diagram showing the structure of a picture coding apparatus300 according to one embodiment using the picture coding methodaccording to the present invention. The picture coding apparatus 300 isa picture coding apparatus that performs motion compensation of a Bpicture (to be coded) in a larger block size than the block size ofmotion compensation of a P picture referring to two pictures. Thepicture coding apparatus 300 includes a difference unit 101, an imagecoding unit 102, a variable length coding unit 103, an image decodingunit 104, an addition unit 105, a picture memory 106, a picture memory107, a motion vector storage unit 110, a motion information conversionunit 301, a motion vector estimation unit 302 and a motion compensationunit 303.

The picture memory 107 stores image data “Img” that represents movingpictures inputted in the display order on a picture-by-picture basis.The difference unit 101 calculates the difference between the image data“Img” read out from the picture memory 107 and the predictive image data“Pred” inputted from the motion compensation unit 303 and generatespredictive residual image data “Res”. Here, in the case of intra picturecoding, inter picture motion compensation is not performed. Andtherefore the value of the predictive image data “Pred” is thought to be“0”. The image coding unit 102 performs coding processes such asfrequency conversion and quantization to the inputted predictiveresidual image data “Res” and generates the coded residual data“CodedRes”. When the current picture to be coded is a B picture, themotion information conversion unit 301 derives motion vectors andinforms the motion vector estimation unit 302 and the motioncompensation unit 303 so that motion compensation is performed in apredetermined block size. In other words, in the case of a B picture,under the condition accepting the unidirectional prediction mode, thebi-predictive mode and the direct mode, and the picture coding apparatus300 performs the motion compensation in the bidirectional mode and thedirect mode in a large block size (for example, estimating motionvectors in a block size smaller than an 8×8-pixel block is prohibited.);in the case of a P picture, the unidirectional prediction in a smallblock size is allowed. Hereby, particularly in the bi-predictive modethat accesses the memory often; selection of motion vectors that referto reference pictures in the small block size is made to be unable.Moreover, the motion information conversion unit 301 converts motionparameters of reference pictures stored in the motion vector storageunit 110 into motion parameters (such as motion vectors) with thepredetermined block size (for example, an 8×8-pixel block), or instructsthe motion vector estimation unit 302 and the motion compensation unit303 to make an interpretation of the motion parameters corresponding tothis conversion.

Using the reference picture data “Ref” that is decoded data of codedpictures stored in the picture memory 106 as a reference picture, themotion vector estimation unit 302 estimates the motion vector thatindicates the location of the block predicted to be optimum in thesearch area in the reference picture, and outputs motion parameters“MotionParam” including the estimated motion vector. The motion vectorstorage unit 110 stores the motion parameters “MotionParam” outputtedfrom the motion vector estimation unit 302.

Furthermore, responding to whether the current picture to be coded is aP picture or a B picture, the motion vector estimation unit 302evaluates errors indicated by the cases of motion-compensating in thecoding modes “Mod”, and compares the motion compensation error when asearch is conducted in the reference picture with the motioncompensation error when deriving motion vectors in the direct mode, theunidirectional predictive mode and the bi-predictive mode. In otherwords, in the direct mode, depending on motion vectors, which areconverted by the motion information conversion unit 301 (converted, forexample, to a block size that is an 8×8 block or larger), of themotion-compensated block in a subsequent block which is co-located withthe current block to be motion-compensated, a motion vector in thecurrent block to be motion-compensated is selected among a plurality ofmotion vectors. By the way, the direct mode is a bi-predictive mode forcalculating the motion vector of the current block to bemotion-compensated using a motion vector derived from another block andfor not coding the motion vector in said current block to bemotion-compensated. The size of the motion vector in the block in asubsequent picture co-located with a current block decides which one ofthe derived motion vector and the motion vector (0, 0) is used. (Theinformation for identifying which one is selected is not coded.)Furthermore, the block in a subsequent picture which is co-located witha current block is the block (the standard block) in the nearestbackward picture (the standard picture) to the current picture to becoded in the display order.

The motion compensation unit 303 generates the predictive image data“Pred” based on this coding mode “Mod” and the motion vector estimatedby the motion vector estimation unit 302. In the direct mode of a Bpicture, the motion compensation unit 303 generates predictive picturesfor each 8×8-pixel current block to be motion-compensated, using themotion vector calculated by the motion vector estimation unit 302. Inaddition, when the motion vector indicates sub-pixel locations such as ahalf pixel and a quarter pixel, the motion compensation unit 303interpolates the sub-pixel locations such as a half pixel and a quarterpixel using a linear filter (a low-pass filter) and the like. In thiscase, since motion vectors with small block sizes are not selected bythe motion vector estimation unit 302 in the bi-predictive mode, themotion compensation unit 303 can perform motion compensation withrelatively large block sizes that do not have many accesses in thebi-predictive mode. Additionally, in the unidirectional mode, the motionvector estimation unit 302 and the motion compensation unit 303 performsmotion compensation that enables motion compensation with small blocksizes. The variable length coding unit 103 performs variable lengthcoding and the like to the inputted coded residual data “CodedRes” andthe motion parameters “MotionParam” outputted from the motion vectorestimation unit 302 and generates the coded data “Bitstream” by furtheradding the coding mode “Mod”.

The image decoding unit 104 performs decoding processes such as inversequantization and inverse frequency conversion to the inputted codedresidual data “CodedRes” and generates decoded residual data “ReconRes”.The addition unit 105 adds the decoded residual data “ReconRes”outputted from the image decoding unit 104 to the predictive image data“Pred” inputted from the motion compensation unit 303 and generates thedecoded image data “Recon”. The picture memory 106 stores the generateddecoded image data “Recon”.

FIG. 5 is a block diagram showing the structure of a picture decodingapparatus 400 according to one embodiment using the picture decodingmethod according to the present invention. The picture decodingapparatus 400 includes a variable length decoding unit 201, an imagedecoding unit 202, an addition unit 203, a picture memory 204, a motionvector storage unit 205, a motion information conversion unit 401 and amotion compensation unit 402.

The variable length decoding unit 201 extracts various data such as thecoded residual data “CodedRes”, motion parameters “MotionParam” andinformation of the coding mode “Mod” used at the time of coding from theinputted coded data “Bitstream”. The image decoding unit 202 decodes theinputted coded residual data “CodedRes” and generates predictiveresidual image data “Res”. The motion information conversion unit 401converts motion parameters of reference pictures read out from themotion vector storage unit 205 into motion parameters (such as motionvectors) with the predetermined block size (for example, an 8×8-pixelblock) or instructs the motion compensation unit 402 to make aninterpretation of the motion parameters corresponding to thisconversion. The motion compensation unit 206 includes inside a pixelinterpolation unit not illustrated that interpolates pixel values of thesub-pixel locations such as a half pixel and a quarter pixel by using alinear filter and the like, and generates the predictive image data“Pred” that is motion compensation data from the decoded image data“Recon” in the picture memory 204 based on the coding mode “Mod” at thetime of coding, motion parameters “MotionParam” and the like. At thistime, when the current macroblock to be decoded is coded in the directmode, motion vectors for generating the predictive image data “Pred” arenot coded. Consequently, the motion compensation unit 402 calculatesmotion vectors in the current block to be motion-compensated usingmotion vectors converted by the motion information conversion unit 401(converted, for example, to a block size that is an 8×8 block or larger)and motion vectors derived in blocks adjacent to the current block to bedecoded, and generates the predictive image data “Pred” on ablock-by-block basis, the block being the current block to bemotion-compensated (for example, an 8×8-pixel block) with the size thatis larger than the smallest block size of a P picture. The motion vectorstorage unit 205 stores the motion parameters “MotionParam” extracted bythe variable length decoding unit 201. The addition unit 203 adds thepredictive residual image data “Res” outputted from the image decodingunit 202 to the predictive image data “Pred” that is motion picturecompensation data outputted from the motion compensation unit 206 andgenerates the decoded image data “Recon”. The picture memory 204 storesthe generated decoded image data “Recon”.

Hereinafter, the picture coding apparatus 300 and the picture decodingapparatus 400 constructed as is described above are explained.

In the present embodiment, in the direct mode of a B picture, the motionvector estimation unit 302 in the picture coding apparatus 300 and themotion compensation unit 402 in the picture decoding apparatus 400select a motion vector used for motion-compensating the current block tobe motion-compensated among a plurality of vectors depending on motionvectors of the motion-compensated block in a subsequent picture which isco-located with the current block to be motion-compensated. For example,the motion vector compensation unit 302 or the motion compensation unit402 selects as a motion vector of the current macroblock to be coded ordecoded either the motion vector (0, 0) or the motion vector beingcalculated using motion vectors of adjacent blocks that have beenalready coded or decoded in the pictures to be coded or decoded, anddetermines that the selected motion vector to be the motion vector inthe current block to be motion-compensated. The adjacent blocks are theblocks that have been already coded or decoded in the same currentpicture to be coded and are neighboring blocks to the current macroblockto be coded or decoded. Hereinafter, regarding the motion compensationmethod in the direct mode using motion vectors in the adjacent blocksthat have been already determined and motion parameters in a backwardreference picture, the processes in the picture coding apparatus 300 areexplained first.

FIG. 6A is a diagram showing a method for determining the motion vectorMV of the current macroblock to be coded or decoded using motion vectorsin the adjacent blocks when the adjacent blocks are motion-compensatedin the same 16×16-pixel block size as the current macroblock. FIG. 6B isa diagram showing the correspondence between the current block to bemotion-compensated and the block in a subsequent picture which isco-located with a current block to be coded or decoded when the currentmacroblock and the block in a subsequent picture which is co-locatedwith a current block are motion-compensated in the same block size. FIG.7 is a diagram showing a method for determining the motion vector of thecurrent macroblock using motion vectors of adjacent blocks when theadjacent blocks are motion-compensated in a smaller block size than thecurrent block. FIG. 8 is a flowchart showing a process formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when a current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with the same block size.

First, the case that the current block to be motion-compensated in thecurrent picture to be coded B1 and the block in a subsequent pictureco-located with said current block to be motion-compensated in thebackward P picture P2 are of the same size and correspond to each otherone by one is explained. The motion information conversion unit 301judges whether the size of motion compensation of the block in asubsequent picture which is co-located with the current block to bemotion-compensated is the same as the size of the current block to bemotion-compensated or not. When they are same, the motion informationconversion unit 301 instructs the motion vector estimation unit 302 tocalculate the motion vector of the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 8. As is shown in the flowchart of FIG. 8, the motion vectorestimation unit 302, first, judges whether “the motion is small” or notin the block co-located with the current block to be motion-compensated(the standard block) in the picture P2 that is a P picture (a standardpicture) following the current picture to be coded B1 shown in FIG. 6B,in other words, a P picture displayed temporally later than the pictureB1 and is neighboring to the picture B1 (S401), and when “the motion issmall”, the motion vector in the current block to be motion-compensatedis determined to be (0, 0) (S402). In other words, to this current blockto be motion-compensated, the motion compensation using an inter pictureprediction is performed determining that the motion vector is (0, 0).Here, “the motion is small” means that the block is coded referring tothe nearest picture to the picture in which the block is included andthe size (the absolute value) of the motion vector is within “1”. But itis acceptable that “the motion is small” simply when the size of themotion vector is the predetermined value or less. Additionally, it isalso acceptable that “the motion is small” when determining that theparticular picture is the reference picture.

On the other hand, when “the motion is NOT small” in the blockco-located with the current block to be motion-compensated in a backwardP picture, in other words, either when the standard block is not codedreferring to the nearest picture or when the size of the motion vectorexceeds “1”, the motion vector estimation unit 302 determines that themotion vector MV in the current macroblock to be coded that iscalculated using motion vectors in the blocks adjacent to the currentmacroblock to be coded is the motion vector in said current block to bemotion-compensated (S404). By the way, in an explanation below, both ofPicture P0 and Picture P2 are determined to be the nearest pictures toPicture B1.

To calculate the motion vector MV of the current macroblock to be coded,the motion vector estimation unit 302, first, chooses three coded blocks(adjacent blocks) neighboring to the current macroblock to be coded.Since the standard and the method for the selection are not importanthere, their explanations are omitted. FIG. 6A shows the three selectedblocks adjacent to the current macroblock to be coded. As is shown inFIG. 6A, in the macroblock located over the current macroblock to becoded, the motion vector MV2 has been already determined; in themacroblock located upper right to the current macroblock to be coded,the motion vector MV3 has been already determined. Moreover, in themacroblock located left to the current macroblock to be coded, themotion vector MV1 has been already determined. The motion vectorestimation unit 302 determines the motion vector MV of said currentmacroblock to be coded using these motion vectors, the motion vectorsMV1, MV2 and MV3. For example, the motion vector referring to thetemporally nearest picture to the current picture to be coded among themotion vectors, MV1, MV2 and MV3, is determined to be a candidate forthe motion vector MV in said current macroblock to be coded. Here, “thetemporally nearest picture to the current picture to be coded” means theforward and nearest picture to the current picture to be coded whenpredicting the motion vector in the current macroblock to be codedreferring to a forward picture, and the backward and nearest picture tothe current picture to be coded when predicting the motion vector of thecurrent macroblock to be coded referring to a backward picture. At thistime, the motion vector estimation unit 302 determines that

-   -   (1) the motion vector MV of said current macroblock to be coded        is (0, 0) when there is no motion vector referring to the        temporally nearest picture to the current picture to be coded;    -   (2) the candidate is the motion vector MV in said macroblock        when there is one motion vector referring to the temporally        nearest picture to the current picture to be coded; and    -   (3) the median of the three motion vectors in the adjacent        blocks is the motion vector MV of the current macroblock to be        coded when there are two or more motion vectors determining that        the motion vector in the adjacent block that does not refer to        the nearest picture is (0, 0).

Up to now, the case that the adjacent blocks to the current macroblockto be coded is motion-compensated in the same size as the current blockto be coded is explained using FIG. 6A. As is shown in FIG. 7, however,even when the adjacent blocks are motion-compensated in a differentblock size from and a smaller block size than that of the currentmacroblock to be coded, it is also possible to calculate similarly themotion vector MV in the current macroblock to be coded. In FIG. 7, thecase that motion vectors are estimated with a 4×4-pixel block as theunit in the adjacent blocks toward a 16×16-pixel current macroblock tobe coded is explained. In a case like this, to calculate the motionvector MV of the current macroblock to be coded, the motion vectorestimation unit 302, first, selects the three adjacent blocks (the blockA, the block B and the block C).

The Block A, for example, belongs to the macroblock located left to thecurrent macroblock to be coded and touches the upper left corner of thecurrent macroblock to be coded. Furthermore, the block B, for example,belongs to the macroblock located over the current macroblock to becoded and touches the upper left corner of the current macroblock to becoded. Further, the block C, for example, belongs to the macroblocklocated upper right to the current macroblock to be coded and touchesthe upper right corner of the current macroblock to be coded.

For the blocks A, B and C, the motion vectors MV1, MV2 and MV3 have beenalready determined, respectively. The motion vector estimation unit 302applies the above-mentioned (1), (2) and (3) to the motion vectors, MV1,MV2 and MV3 and can determine the motion vector MV in the currentmacroblock to be coded similarly to the case that the current macroblockto be coded and the adjacent blocks are motion-compensated in the samesize. Regarding each current block to be motion-compensated in thecurrent macroblock to be coded, as is already explained, depending onwhether “the motion is small” or not in the block in a subsequentpicture which is co-located with a current block, the motion vectorestimation unit 302 selects either the motion compensation using themotion vector (0, 0) or the motion compensation using the motion vectorMV.

As is described above, when the motion vector of the current block to bemotion-compensated is determined, the motion compensation unit 303generates the predictive image data “Pred” from the reference picturedata “Ref” in the picture memory 106 using the determined motion vector(S403).

Up to now, the case that the block in a subsequent picture which isco-located with the current block to be motion-compensated ismotion-compensated in the same block size with the current block to bemotion-compensated is explained. Hereinafter, the case that the block ina subsequent picture which is co-located with the current block to bemotion-compensated is motion-compensated in a different block size fromthat of the current block to be compensated is explained. In the picturecoding apparatus 300, when performing the bi-predictive motioncompensation of a B picture, the motion compensation unit 303 and themotion vector estimation unit 302 perform motion compensation targetingat blocks with a predetermined size (for example, 8×8-pixel blocks) thatis larger than the smallest (4×4-pixel) block that can be a target blockfor unidirectional predictive motion compensation. Consequently, when abackward reference picture of a picture that is motion-compensatedbi-predictively is motion-compensated unidirectionally, the case thatthe block in a subsequent picture which is co-located with the currentblock to be motion-compensated is motion-compensated in a smaller blocksize than that of the current block to be motion-compensated may occur.

FIG. 9 is a diagram showing the correspondence between the current blockto be motion-compensated and the plurality of blocks in a subsequentpicture which is co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated in different block sizes. Inthe left side of FIG. 9 is shown a current macroblock to be coded in thecurrent B picture to be coded; in the right side of FIG. 9 is shown themacroblock in the subsequent picture which is co-located with thecurrent macroblock to be coded in the nearest backward picture (a Ppicture or a B picture) to the current B picture. The size of themacroblocks is same and 16 pixels×16 pixels, for example. The macroblockin a subsequent picture shown in the right side of FIG. 9, which isco-located with a current macroblock is coded earlier than a currentpicture and is assumed to be already motion-compensated with a 4×4-pixelblock (the smallest lot in the figure), for example, as the unit.

FIG. 10 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.The motion information conversion unit 301, first, judges whether theblock in a subsequent picture which is co-located with the current blockto be motion-compensated and the current block to be motion-compensatedare motion-compensated in the same block size or not. When they are notmotion-compensated in the same block size, the motion informationconversion unit 301 instructs the motion vector estimation unit 302 tocalculate the motion vector in the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 10. Here, since the size of the current block to bemotion-compensated is 8 pixels×8 pixels and the block in a subsequentpicture which is co-located with the current block to motion-compensatedwith a 4×4-pixel size. The motion vector estimation unit 302 calculatesthe motion vector in the current block to be motion-compensatedfollowing the flowchart shown in FIG. 10.

In the flowchart shown in FIG. 10, the process in Step S501 is differentfrom the process in Step S401 shown in the flowchart in FIG. 8. As isshown in FIG. 9, in the motion compensation method according to thepresent invention, one current block to be coded is motion-compensatedin each unit of four current blocks to be motion-compensated. Determinethem, for example, to be the current block to be motion-compensated a,the current block to be motion-compensated b, the current block to bemotion-compensated c and the current block to be motion-compensated d.To these current blocks to be motion-compensated, in the macroblock in asubsequent picture which is co-located with a current macroblock, theblock a′, the block b′, the block c′ and the block d′ correspond,respectively. Each of these blocks a′, b′, c′ and d′ is further composedof four 4×4-pixel current blocks to be motion-compensated. The motionvector estimation unit 302, first, identifies the block a′ in themacroblock in a subsequent picture which is co-located with andcorresponds to the current block a to be motion-compensated in thecurrent macroblock to be coded and judges whether “the motion is small”or not in two or more current blocks to be motion-compensated out of thefour current blocks to be motion-compensated that compose the block a′(S501).

The standard for judging whether “the motion is small” or not in thecurrent blocks to be motion-compensated is similar to that of Step S401in the flowchart shown in FIG. 8. When “the motion is small” in two ormore current blocks to be motion-compensated, the motion vectorestimation unit 302 determines that the motion vector of the currentblock to be motion-compensated a in the current macroblock to be codedis (0, 0) (S502); the motion compensation unit 303 performs motioncompensation using the determined motion vector (0, 0) (S502). When “themotion is NOT small” in two or more blocks, in other words, when thenumber of the current blocks to be motion-compensated whose “motion issmall” is less than two, the motion vector estimation unit 302determines the motion vector MV of the current macroblock to be codedusing motion vectors of adjacent blocks to the current macroblock to becoded (S504). The process for determining the motion vector MV of thecurrent macroblock to be coded using the motion vectors of the adjacentblocks is similar to that of Step S404 in FIG. 8. The motioncompensation unit 303 generates the motion compensation predictive pixelvalues of the current block to be motion-compensated a using the motionvector MV determined like this (S503).

The motion compensation unit 303, the motion vector estimation unit 302and the motion information conversion unit 301 repeat the processes ofthe above-mentioned Steps S501 S504 to the remaining current blocks tobe motion-compensated, b, c and d, and complete the motion compensationto said current macroblock to be coded when performing the motioncompensation to all the current blocks to be motion-compensated, a, b, cand d.

On the other hand, the picture decoding apparatus 400 decodes the codeddata “Bitstream” coded by the picture coding apparatus 300. In thedirect mode, the picture decoding apparatus 400 can motion-compensateeach current block to be motion-compensated similarly to the picturecoding apparatus 300 because the motion information conversion unit 401performs the process corresponding to that of the motion informationconversion unit 301 in the picture coding apparatus 300 and the motioncompensation unit 402 performs the processes corresponding to those ofthe motion vector estimation unit 302 and the motion compensation unit300 in the picture coding apparatus 300.

Additionally, when it is indicated in the coding mode “Mod” extractedfrom the coded data “Bitstream” by the variable length decoding unit 201that current macroblocks to be decoded is coded in the direct mode, themotion information conversion unit 401 judges whether the size of themotion-compensated block in a subsequent picture which is co-locatedwith a current block to be motion-compensated is the same as the size ofthe current block to be motion-compensated; when they are same, themotion information conversion unit 401 instructs the motion vectorestimation unit 402 to calculate the motion vector of the current blockto be motion-compensated following the procedure shown in the flowchartof FIG. 8.

Following this instruction, the motion vector estimation unit 402,first, judges whether “the motion is small” or not in themotion-compensated block in a P picture (a backward reference picture)P2 which is co-located with the current block to be motion-compensatedfollowing the current picture to be decoded B1 shown in FIG. 6B (5401),and when “the motion is small”, the motion vector in the current blockto be motion-compensated is determined to be (0, 0) (S402). In otherwords, to this current block to be motion-compensated, the motioncompensation using an inter picture prediction is not performed. On theother hand, when “the motion is NOT small” in the motion-compensatedblock in a backward P picture which is co-located with the current blockto be motion-compensated, the motion vector estimation unit 402determines that the motion vector MV of the current macroblock to bedecoded that is calculated using motion vectors of the blocks adjacentto the current macroblock to be decoded is the motion vector of saidcurrent block to be motion-compensated (S404). The method forcalculating the motion vector of the current macroblock to be decodedusing the motion vectors in the decoded adjacent blocks is the same asthe method explained in the case of the picture coding apparatus 300.

When the motion vector of the current block to be motion-compensated isdetermined in Step S402 or Step S404, the motion compensation unit 402reads out the block whose location is shown by the determined motionvector out of the reference picture data “Ref” in the picture memory 204and generates the predictive image data “Pred” (S403). As is describedabove, although the current block to be motion-compensated and themotion-compensated block in a subsequent picture which is co-locatedwith the current block to be motion-compensated are motion-compensatedin the same block size, the motion compensation unit 402 can determinethe motion vector for each current block to be motion-compensated andperform motion compensation, depending on whether “the motion is small”or not in the current block to be motion-compensated in a subsequentpicture which is co-located with a current block.

Additionally, when it is indicated that the current macroblock to bedecoded is coded in the direct mode in the extracted coding mode “Mod”and when the current block to be motion-compensated and themotion-compensated block in a subsequent picture which is co-locatedwith the current block to be motion-compensated are notmotion-compensated in the same block size, the motion informationconversion unit 401 instructs the motion compensation unit 402 tocalculate the motion vector of the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 10. In the macroblock (in a subsequent P picture) which isco-located with the current macroblock to be decoded (in the currentpicture to be decoded and to which the subsequent P picture is nearest),the motion compensation unit 402 examines the motion of four 4×4-pixelmotion-compensated blocks included in an 8×8-pixel block correspondingto a current 8×8-pixel block to be motion-compensated and determines themotion vector of the current block to be motion-compensated to be (0, 0)when “the motion is small” in two or more motion-compensated blocks outof the four (S502). When it is not the case, the motion compensationunit 402 determines the motion vector MV of the current macroblock to bedecoded, which is calculated using the motion vectors of adjacent blocksto the current macroblock to be decoded, to be the motion vector of thecurrent block to be motion-compensated (S504). When the motion vector ofthe current block to be motion-compensated is determined in Step S502 orStep S504, the motion compensation unit 402 reads out the block whoselocation is shown by the determined motion vector of the referencepicture data “Ref” in the picture memory 204 and generates thepredictive image data “Pred”. Hereby, although the current block to bemotion-compensated and the motion-compensated block in a subsequentpicture which is co-located with the current block to bemotion-compensated are motion-compensated in different block sizes, themotion compensation unit 402 can judge whether “the motion is small” ornot in the motion-compensated block in a subsequent picture which isco-located with a current block. Consequently, the motion compensationunit 402 can, depending on this judgment result, determine the motionvector of each current block to be motion-compensated and perform motioncompensation to the current block to be motion-compensated.

As described above, since the picture coding apparatus 300 and thepicture decoding apparatus 400, using the motion compensation methodaccording to the present invention, perform motion compensation with alarger-sized current block to be motion-compensated than theconventional current block to be motion-compensated as the unit, inmotion-compensation coding a B picture, the load by access to thepicture memory in coding and decoding the B picture can be reduced.

By the way, in the above-described First Embodiment, the size of acurrent block to be motion-compensated of a B picture is explained to be8 pixels×8 pixels and the size of a motion-compensated block of a Ppicture is explained to be 4 pixels×4 pixels but the present inventionis not limited to these sizes and it is acceptable to decide ondifferent sizes from these sizes. Moreover, when “the motion is small”in two or more motion-compensated blocks of the blocks corresponding tothe current blocks to be motion-compensated in the nearest subsequentpicture to a current picture, the motion vector of the current block tobe motion-compensated is determined to be (0, 0), but it is notnecessarily to be “two or more” and it is satisfactory to be “one ormore” or “three or more” or “all”. Furthermore, when current blocks tobe motion-compensated and their sizes are decided to be other than theabove-described, it is acceptable to decide appropriately according tothe proportion of these block sizes. This is also applicable to thefollowing embodiments.

Further, in the First Embodiment, in the flowchart shown in FIG. 8 orFIG. 10, the motion vector determined based on motion vectors ofadjacent blocks is one for one current macroblock to be coded ordecoded. Consequently, when the process of Step S404 or Step S504 isperformed to the current block to be motion-compensated in the samecurrent macroblock, the same calculation process is repeated every timeas a result. However, the present invention is not limited to this. Itis satisfactory, for example, to determine the motion vector in advancebased on motion vectors of adjacent blocks for each current macroblock,in other words, to perform the process of Step S404 or Step S504 beforethe judgment in Step S401 or Step S501 and to simply “use the value ofthe motion vector determined in advance based on the motion vectors ofthe adjacent block as the motion vector of said current block to bemotion-compensated” in Step S404 or Step S504. Hereby, when “the motionis NOT small” in the block in a subsequent picture which is co-locatedwith the current block to be motion-compensated, the effect to lessenthe number of calculations of the motion vector based on the motionvectors of the adjacent blocks and to reduce the processing load of themotion vector estimation unit 302 and the motion compensation unit 402is achieved. This is also applicable to the following embodiments.

Furthermore, in stead of performing the process of Step S401 or StepS501 before the judgment of Step S401 or Step S501, it is acceptable tohold, in a memory and the like, the motion vector MV of the currentmacroblock to be code/decoded that is calculated by the process of StepS404 or Step 504 when the process of Step S404 or Step S504 isperformed. The duration for holding the motion vector MV is the durationfor processing current blocks to be motion-compensated in the samecurrent macroblock. Concretely, it is satisfactory that the motionvector estimation unit 303 or the motion compensation unit 402calculates the motion vector of the current macroblock only when “themotion is NOT small” in the block in a subsequent picture which isco-located with the current block to be motion-compensated in thecurrent macroblocks and holds the motion vector MV of the currentmacroblock while the current blocks to be motion-compensated in the samecurrent macroblock to be coded or decoded. Hereby, the effect to furtherlessen the number of calculations by the motion vector estimation unit302 and the motion compensation unit 402 and to further reduce theprocessing load of the motion vector estimation unit 302 and the motioncompensation unit 402 is achieved.

Additionally, in the First Embodiment, it is described that in Step S404or Step S504 in the flowchart of FIG. 8 or FIG. 10, the motion vector ofthe current macroblock to be coded or decoded is determined using motionvectors of adjacent blocks, but it is not necessary to determine themotion vector MV of the current block to be coded or decoded by thismethod. For example, it is acceptable that the motion vector of thecurrent macroblock is determined using the motion vector of the block ina picture which is co-located with the current macroblock in anotherpicture whose motion vector has been determined in advance. This is alsoapplicable to the following embodiments.

In addition, in the First Embodiment, it is explained that the motioninformation conversion unit 301 converts a motion parameter of areference picture into a parameter with a predetermined block size afterthe motion parameter of the reference picture is stored in the motionvector storage unit 110 but it is satisfactory that the motioninformation conversion unit 301 performs the conversion before themotion parameter of the reference picture is stored in the motion vectorstorage unit 110. This is also applicable to the following embodiments.For example, when a motion parameter of a reference picture is estimatedwith a 4×4-pixel block as the unit for motion compensation, the motioninformation conversion unit 301 rewrites all the values of the motionvectors, MV1, MV2, MV3 and MV4 estimated in four 4×4-pixel blockscontained in the 8×8-pixel block into the value of one 4×4-pixel block,MV1, in the 8×8-pixel block, located in the four corners of the16×16-pixel macroblock. Hereby, all the four 4×4-pixel blocks obtainedby dividing the macroblock into four 8×8-pixel blocks and furtherdividing each 8×8-pixel block into four, have the same motion vectors asthe motion vectors estimated for four 4×4-pixel blocks, in the 8×8-pixelblock, located in the four corners of the macroblock. By storing amotion parameter converted like this in the motion vector storage unit110, when the motion vector estimation unit 302 reads out the motionvector of any one of the four 4×4-pixel blocks included in the block ina subsequent picture which is co-located with the current block, themotion vector estimation unit 302 can easily judge the motion of theblock in a subsequent picture which is co-located with a current block.

Additionally, it is acceptable that when the motion parameter of areference picture is estimated with a 4×4-pixel block as the unit ofmotion compensation, for example, the motion information conversion unit301 associates one motion vector, for example, MV1, with each 8×8-pixelblock obtained by dividing a 16×16 macroblock into four, and stores theone motion vector in the motion vector storage unit 110. This is alsoapplicable to the following embodiments. This motion vector is themotion vector and the like estimated for the four 4×4-pixel blocks, inthe 8×8-pixel block, located in the four corners of the 16×16-pixelmacroblock. Hereby, although the motion parameter of the referencepicture is estimated with a 4×4-pixel block as the unit of motioncompensation, the motion vector estimation unit 302 can judge whether“the motion is small” or not in the block in a subsequent picture whichis co-located with a current block with a similar process to the processshown in FIGS. 6A and 8.

Further, it is satisfactory that when the motion parameter of areference picture is estimated with a 4×4-pixel block as the unit ofmotion compensation, for example, the motion information conversion 301judges whether “the motion is small” or not in the four 4×4-pixelblocks, in the 8×8-pixel block, located in the four corners of the16×16-pixel macroblock and stores the flag indicating the judgmentresult associated with each 8×8-pixel block in the current macroblock tobe coded in the motion vector storage unit 110. This is also applicableto the following embodiments. Hereby, it is not necessary for the motionvector estimation unit 302 to judge whether “the motion is small” or notin the block in a subsequent picture which is co-located with a currentblock when motion-compensating a B picture and the effect to reduceprocessing load for motion-compensating a B picture can be reduced isachieved.

(The Second Embodiment)

In the Second Embodiment that is explained next, when the currentmacroblock to be coded or decoded and the macroblock in a subsequentpicture which is co-located with the current macroblock aremotion-compensated in different sizes, the judgment method for selectingeither determining the motion vector of the current block to bemotion-compensated to be (0, 0) or determining the motion vector of thecurrent block to be motion-compensated using the motion vectors of theadjacent blocks is different from the judgment method of the FirstEmbodiment. When the current macroblock and the macroblock in asubsequent picture which is co-located with the current macroblock aremotion-compensated in the same block size, motion compensation of acurrent block to be motion-compensated is performed following themethods explained in FIGS. 6A, 6B, 7 and 8 of the First Embodiment.Consequently, in respect of the structure, the principally differentparts between the picture coding apparatus/the picture decodingapparatus according to the Second Embodiment and the picture codingapparatus 300/the picture decoding apparatus 400 indicated in the FirstEmbodiment are the motion information conversion unit and the motionvector estimation unit in the picture coding apparatus and the motioninformation conversion unit and the motion compensation unit in thepicture decoding apparatus. The explanations of overlapping componentsare omitted below.

FIG. 11 is a diagram showing the correspondence between the currentblock to be motion-compensated and the plurality of blocks in asubsequent picture which are co-located with the current block to bemotion-compensated when the current macroblock to be coded/decoded andthe macroblock in a subsequent picture which is co-located with acurrent macroblock are motion-compensated in different block sizes inthe Second Embodiment. In the left side of FIG. 11 is shown a currentmacroblock to be coded or decoded in the current B picture to be codedor decoded, similarly to FIG. 9. In the right side of FIG. 11 is shownthe macroblock in a subsequent picture which is co-located with thecurrent macroblock, similarly to FIG. 9. The picture to which themacroblock, shown in the right side of FIG. 11, in a subsequent picturewhich is co-located with a current macroblock belongs is a P picture ora B picture; for example, motion vector estimation and motioncompensation have been already performed to the macroblock with a4×4-pixel block (the smallest lot in FIG. 11) as the unit. To thecurrent macroblock shown in the left side of FIG. 11, similarly to FIG.9, motion vector determination and motion compensation is performed withan 8×8-pixel block as the unit.

As is shown in FIG. 11, one current macroblock to be coded or decoded iscomposed of four current blocks to be motion-compensated. When the fourcurrent blocks to be motion-compensated are called, for example, to bethe current blocks to be motion-compensated a, b, c and d, in themacroblock in a subsequent picture which are co-located with a currentblock, four 8×8-pixel blocks, each of which is composed of fourmotion-compensated 4×4-pixel blocks, correspond to each the currentblock to be motion-compensated.

FIG. 12 is a flowchart showing a process in the Second Embodiment formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when a current macroblock to be coded or decodedand a macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes. Asis already explained, in the motion compensation method according to theSecond Embodiment, since only the judgment method for selecting themotion vector of the current block to be motion-compensated isdifferent, only the process in Step S701 of FIG. 12 is different fromthe process in Step S501 of FIG. 10.

First, the motion information conversion unit judges whether the size ofmotion compensation in the block in a subsequent picture which isco-located with the current block to be motion-compensated is the sameas the size of the current block to be motion-compensated or not. Whenthey are same, the motion information conversion unit instructs themotion vector estimation unit to calculate the motion vector of thecurrent block to be motion-compensated following the procedure shown inthe flowchart of FIG. 8. On the contrary, when the motion compensationis not performed in the same block size, the motion informationconversion unit instructs the motion vector estimation unit or themotion estimation unit to calculate the motion vector of the currentblock to be motion-compensated.

The motion vector estimation unit or the motion compensation unit judgeswhether “the motion is small” or not in the motion-compensated block a′located in a corner of the macroblock in a subsequent picture which isco-located with a current block out of the four motion-compensatedblocks that compose the block in the macroblock in a subsequent picturewhich is co-located with a current macroblock, the block a′corresponding to the motion-compensated block a in the currentmacroblock (S701).

The standard for judging whether “the motion is small” or not in themotion-compensated block a′ is similar to that in Step S401 shown inFIG. 8. When “the motion is small” in the motion-compensated block a′,the motion vector estimation unit or the motion vector compensation unitdetermines that the motion vector of the current block to bemotion-compensated in the current macroblock to be coded or decoded is(0, 0) (S702). The motion compensation unit motion-compensates thecurrent block to be motion-compensated a using the determined motionvector (0, 0) (S703).

When “the motion is NOT small” in the current block to bemotion-compensated a′, using the motion vectors of the adjacent blocksto the current block to be coded or decoded, the motion vectorestimation unit or the motion compensation unit determines the motionvector MV of said current macroblock (S704). The process for determiningthe motion vector MV of the current macroblock using the motion vectorsof the adjacent blocks is similar to the process in Step S404 of FIG. 8.The motion compensation unit generates the motion compensationpredictive pixel values of the current block to be motion-compensated ausing the motion vector MV determined like this (S703). By the processdescribed above, the motion compensation of one current block to bemotion-compensated a has completed.

The motion vector estimation unit, the motion compensation unit and themotion information conversion unit in the picture coding apparatusaccording to the Second Embodiment and the motion compensation unit andthe motion information conversion unit in the picture decoding apparatusaccording to the Second Embodiment subsequently repeats the process ofthe above-mentioned Steps S701˜S704 to the remaining current blocks tobe motion-compensated b, c and d and complete motion compensation to onecurrent macroblock to be coded or decoded.

In other words, regarding the current block to be motion-compensated b,the motion vector estimation unit judges whether “the motion is small”or not in the motion-compensated block b′, in the block in a subsequentpicture which is co-located with the current block to bemotion-compensated b, located in a corner of the macroblock in asubsequent picture which is co-located with the current macroblock, andselects the motion vector (0, 0) when “the motion is small” in themotion-compensated block b′. When “the motion is NOT small” in themotion-compensated block b′, the motion vector estimation unit selectsthe motion vector MV of the current macroblock using the motion vectorsof the adjacent blocks. The motion compensation unit performs motioncompensation to the current block to be motion-compensated b using theselected motion vector.

Additionally, similarly to the current blocks to be motion-compensated cand d, the motion vector estimation unit selects the motion vectordepending on the motion of the motion-compensated blocks c and d, andthe motion compensation unit motion-compensates the current blocks to bemotion-compensated c and d. Herewith, when the picture coding apparatusand the picture decoding apparatus perform motion compensation to allthe current blocks to be motion-compensated in the current macroblock,the picture coding apparatus and the picture decoding apparatus completemotion compensation to said current macroblock to be coded or decoded.

As is described above, by the motion compensation method according tothe Second Embodiment, since it is possible to select the motion vectorused for motion-compensating the current block to be motion-compensatedonly by examining the motion of one motion-compensated block located ina corner of the macroblock in a subsequent picture which is co-locatedwith a current macroblock, the effect to reduce the processing load ofthe motion vector estimation unit or motion compensation unit comparedwith the motion compensation method according to the First Embodiment isachieved.

(The Third Embodiment)

Furthermore, it is possible to easily perform the processing shown inthe above embodiments in an independent computing system by recording aprogram for realizing the picture coding method and the picture decodingmethod shown in the above-mentioned embodiments onto the storage mediumsuch as a flexible disk.

FIG. 13 is an illustration of a recoding medium for storing a programfor realizing the First and Second Embodiments by a computer system.

FIG. 13B shows a full appearance of a flexible disk, its structure atcross section and the flexible disk itself whereas FIG. 13A shows anexample of a physical format of the flexible disk as a main body of astoring medium. A flexible disk FD is contained in a case F, a pluralityof tracks Tr are formed concentrically from the periphery to the insideon the surface of the disk, and each track is divided into 16 sectors Sein the angular direction. Therefore, as for the flexible disk storingthe above-mentioned program, data as the aforementioned program isstored in an area assigned for it on the flexible disk FD.

FIG. 13C shows a structure for recording and reading out the program onthe flexible disk FD. When the program is recorded on the flexible diskFD, the computing system Cs writes in data as the program via a flexibledisk drive. When the coding device and the decoding device areconstructed in the computing system by the program on the flexible disk,the picture coding method and a picture decoding method as the programis read out from the flexible disk drive and then transferred to thecomputing system Cs.

The above explanation is made on an assumption that a storing medium isa flexible disk, but the same processing can also be performed using anoptical disk. In addition, the storing medium is not limited to aflexible disk and an optical disk, but any other medium such as an ICcard and a ROM cassette capable of recording a program can be used.

(The Fourth Embodiment)

The following is an explanation of the applications of the picturecoding method as well as the picture decoding method as shown in theabove-mentioned embodiments, and a system using them.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing content distribution service. The areafor providing communication service is divided into cells of desiredsize, and cell sites ex107˜ex110 which are fixed wireless stations areplaced in respective cells.

This content supply system ex100 is connected to devices such asInternet ex101, an Internet service provider ex102, a telephone networkex104, as well as a computer ex111, a PDA (Personal Digital Assistant)ex112, a camera ex113, a cell phone ex114 and a cell phone with a cameraex115 via the cell sites ex107˜ex110.

However, the content supply system ex100 is not limited to theconfiguration as shown in FIG. 14 and may be connected to a combinationof any of them. Also, each device may be connected directly to thetelephone network ex104, not through the cell sites ex107˜ex110.

The camera ex113 is a device capable of shooting video such as a digitalvideo camera. The cell phone ex114 may be a cell phone of any of thefollowing system: a PDC (Personal Digital Communications) system, a CDMA(Code Division Multiple Access) system, a W-CDMA (Wideband-Code DivisionMultiple Access) system or a GSM (Global System for MobileCommunications) system, a PHS (Personal Handyphone System) or the like.

A streaming server ex103 is connected to the camera ex113 via thetelephone network ex104 and also the cell site ex109, which realizes alive distribution or the like using the camera ex113 based on the codeddata transmitted from the user. Either the camera ex113 or the serverwhich transmits the data may code the data. Also, the picture data shotby a camera ex116 may be transmitted to the streaming server ex103 viathe computer ex111. In this case, either the camera ex116 or thecomputer ex111 may code the picture data. An LSI ex117 included in thecomputer ex111 or the camera ex116 actually performs coding processing.Software for coding and decoding pictures may be integrated into anytype of storage medium (such as a CD-ROM, a flexible disk and a harddisk) that is a recording medium which is readable by the computer ex111or the like. Furthermore, a cell phone with a camera ex115 may transmitthe picture data. This picture data is the data coded by the LSIincluded in the cell phone ex115.

The content supply system ex100 codes contents (such as a music livevideo) shot by a user using the camera ex113, the camera ex116 or thelike in the same way as shown in the above-mentioned embodiments andtransmits them to the streaming server ex103, while the streaming serverex103 makes stream distribution of the content data to the clients attheir requests. The clients include the computer ex111, the PDA ex112,the camera ex113, the cell phone ex114 and so on capable of decoding theabove-mentioned coded data. In the content supply system ex100, theclients can thus receive and reproduce the coded data, and can furtherreceive, decode and reproduce the data in real time so as to realizepersonal broadcasting.

When each device in this system performs coding or decoding, the picturecoding method or the picture decoding method shown in theabove-mentioned embodiments can be used.

A cell phone will be explained as an example of the device.

FIG. 15 is a diagram showing the cell phone ex115 using the picturecoding method and the picture decoding method explained in theabove-mentioned embodiments. The cell phone ex115 has an antenna ex201for communicating with the cell site ex110 via radio waves, a cameraunit ex203 such as a CCD camera capable of shooting moving and stillpictures, a display unit ex202 such as a liquid crystal display fordisplaying the data such as decoded pictures and the like shot by thecamera unit ex203 or received by the antenna ex201, a body unitincluding a set of operation keys ex204, a audio output unit ex208 suchas a speaker for outputting audio, a audio input unit ex205 such as amicrophone for inputting audio, a storage medium ex207 for storing codedor decoded data such as data of moving or still pictures shot by thecamera, data of received e-mails and that of moving or still pictures,and a slot unit ex206 for attaching the storage medium ex207 to the cellphone ex115. The storage medium ex207 stores in itself a flash memoryelement, a kind of EEPROM (Electrically Erasable and Programmable ReadOnly Memory) that is a nonvolatile memory electrically erasable from andrewritable to a plastic case such as an SD card.

Next, the cell phone ex115 will be explained with reference to FIG. 16.In the cell phone ex115, a main control unit ex311, designed in order tocontrol overall each unit of the main body which contains the displayunit ex202 as well as the operation keys ex204, is connected mutually toa power supply circuit unit ex310, an operation input control unitex304, a picture coding unit ex312, a camera interface unit ex303, anLCD (Liquid Crystal Display) control unit ex302, a picture decoding unitex309, a multiplexing/demultiplexing unit ex308, a read/write unitex307, a modem circuit unit ex306 and a audio processing unit ex305 viaa synchronous bus ex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies respective units with powerfrom a battery pack so as to activate the camera attached digital cellphone ex115 as a ready state.

In the cell phone ex115, the audio processing unit ex305 converts theaudio signals received by the audio input unit ex205 in conversationmode into digital audio data under the control of the main control unitex311 including a CPU, ROM and RAM, the modem circuit unit ex306performs spread spectrum processing of the digital audio data, and thecommunication circuit unit ex301 performs digital-to-analog conversionand frequency conversion of the data, so as to transmit it via theantenna ex201. Also, in the cell phone ex115, the communication circuitunit ex301 amplifies the data received by the antenna ex201 inconversation mode and performs frequency conversion andanalog-to-digital conversion to the data, the modem circuit unit ex306performs inverse spread spectrum processing of the data, and the audioprocessing unit ex305 converts it into analog audio data, so as tooutput it via the audio output unit ex208.

Furthermore, when transmitting an e-mail in data communication mode, thetext data of the e-mail inputted by operating the operation keys ex204of the main body is sent out to the main control unit ex311 via theoperation input control unit ex304. In the main control unit ex311,after the modem circuit unit ex306 performs spread spectrum processingof the text data and the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion for the text data,the data is transmitted to the cell site ex110 via the antenna ex201.

When picture data is transmitted in data communication mode, the picturedata shot by the camera unit ex203 is supplied to the picture codingunit ex312 via the camera interface unit ex303. When it is nottransmitted, it is also possible to display the picture data shot by thecamera unit ex203 directly on the display unit ex202 via the camerainterface unit ex303 and the LCD control unit ex302.

The picture coding unit ex312, which includes the picture codingapparatus as explained in the present invention, compresses and codesthe picture data supplied from the camera unit ex203 by the codingmethod used for the picture coding apparatus as shown in theabove-mentioned first embodiment so as to transform it into codedpicture data, and sends it out to the multiplexing/demultiplexing unitex308. At this time, the cell phone ex115 sends out the audio receivedby the audio input unit ex205 during the shooting with the camera unitex203 to the multiplexing/demultiplexing unit ex308 as digital audiodata via the audio processing unit ex305.

The multiplexing/demultiplexing unit ex308 multiplexes the coded picturedata supplied from the picture coding unit ex312 and the audio datasupplied from the audio processing unit ex305 using a predeterminedmethod, then the modem circuit unit ex306 performs spread spectrumprocessing of the multiplexed data obtained as a result of themultiplexing, and lastly the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion of the data forthe transmission via the antenna ex201.

As for receiving data of a moving picture file which is linked to a Webpage or the like in data communication mode, the modem circuit unitex306 performs inverse spread spectrum processing of the data receivedfrom the cell site ex110 via the antenna ex201, and sends out themultiplexed data obtained as a result of the inverse spread spectrumprocessing.

In order to decode the multiplexed data received via the antenna ex201,the multiplexing/demultiplexing unit ex308 separates the multiplexeddata into a bit stream of picture data and that of audio data, andsupplies the coded picture data to the picture decoding unit ex309 andthe audio data to the audio processing unit ex305 respectively via thesynchronous bus ex313.

Next, the picture decoding unit ex309, including the picture decodingapparatus as explained in the above-mentioned invention, decodes the bitstream of picture data using the decoding method corresponding to thecoding method as shown in the above-mentioned embodiments to generatereproduced moving picture data, and supplies this data to the displayunit ex202 via the LCD control unit ex302, and thus the picture dataincluded in the moving picture file linked to a Web page, for instance,is displayed. At the same time, the audio processing unit ex305 convertsthe audio data into analog audio data, and supplies this data to theaudio output unit ex208, and thus the audio data included in the movingpicture file linked to a Web page, for instance, is reproduced.

The present invention is not limited to the above-mentioned system assuch ground-based or satellite digital broadcasting has been in the newslately and at least either the picture coding apparatus or the picturedecoding apparatus described in the above-mentioned embodiments can beincorporated into a digital broadcasting system as shown in FIG. 17.More specifically, a bit stream of video information is transmitted froma broadcast station ex409 to or communicated with a broadcast satelliteex410 via radio waves. Upon receipt of it, the broadcast satellite ex410transmits radio waves for broadcasting. Then, a home-use antenna ex406with a satellite broadcast reception function receives the radio waves,and a television (receiver) ex401 or a set top box (STB) ex407 decodesthe bit stream for reproduction. The picture decoding apparatus as shownin the above-mentioned embodiment can be implemented in the reproducingapparatus ex403 for reading out and decoding the bit stream recorded ona storage medium ex402 that is a recording medium such as CD and DVD. Inthis case, the reproduced video signals are displayed on a monitorex404. It is also conceivable to implement the picture decodingapparatus in the set top box ex407 connected to a cable ex405 for acable television or the antenna ex406 for satellite and/or ground-basedbroadcasting so as to reproduce them on a monitor ex408 of thetelevision ex401. The picture decoding apparatus may be incorporatedinto the television, not in the set top box. Also, a car ex412 having anantenna ex411 can receive signals from the satellite ex410 or the cellsite ex107 for reproducing moving pictures on a display device such as acar navigation system ex413 set in the car ex412.

Furthermore, the picture coding apparatus as shown in theabove-mentioned embodiments can code picture signals and record them ona recording medium. As a concrete example, a recorder ex420 such as aDVD recorder for recording picture signals on a DVD disk ex421, a diskrecorder for recording them on a hard disk can be cited. They can berecorded on an SD card ex422. If the recorder ex420 includes the picturedecoding apparatus as shown in the above-mentioned embodiments, thepicture signals recorded on the DVD disk ex421 or the SD card ex422 canbe reproduced for display on the monitor ex408. As for the structure ofthe car navigation system ex413, the structure without the camera unitex203, the camera interface unit ex303 and the picture coding unitex312, out of the components shown in FIG. 16, is conceivable. The sameapplies for the computer ex111, the television (receiver) ex401 andothers.

In addition, three types of implementations can be conceived for aterminal such as the above-mentioned cell phone ex114; asending/receiving terminal implemented with both a coder and a decoder,a sending terminal implemented with a coder only, and a receivingterminal implemented with a decoder only. As described above, it ispossible to use the picture coding method or the picture decoding methoddescribed in the above-mentioned embodiments for any of theabove-mentioned devices and systems, and by using this method, theeffects described in the above-mentioned embodiments can be obtained.

INDUSTRIAL APPLICABILITY

The picture coding apparatus according to the present invention isuseful as the picture coding apparatus that is included in a personalcomputer and a PDA that are equipped with the communication function, adigital broadcasting station, a cell phone and the like.

The picture decoding apparatus according to the present invention isuseful as the picture decoding apparatus that is included in a personalcomputer and a PAD with the communication function, an STB that receivesdigital broadcast, cell phone and the like.

1. A motion compensation method for coding or decoding an image signal,the motion compensation method comprising: a selection step of selectingone of methods for generating a motion vector of a block in a currentmacroblock to be coded or decoded, depending on a motion vector of ablock located in a corner of a coded or decoded macroblock among a groupof blocks that compose the coded or decoded macroblock corresponding tothe current macroblock; and a motion compensation step of generating apredictive image of the block in the current macroblock based on themotion vector generated by the selected method.
 2. The motioncompensation method according to claim 1, wherein each block among thegroup of blocks is Nx pixels×Ny pixels in size where Nx and Ny arenatural numbers, while the size of the block in the current macroblockis Kx·Nx pixels×Ky·Ny pixels where Kx and Ky are natural numbers.
 3. Themotion compensation method according to claim 2, wherein either one ofNx and Ny is a multiple of the other, and Kx·Nx≧8 and Ky·Ny≧8.
 4. Themotion compensation method according to claim 1, wherein one of themethods for generating the motion vector is to determine the motionvector to be “0”.
 5. The motion compensation method according to claim1, wherein one of the methods for generating the motion vector is togenerate a motion vector with reference to motion vectors of coded ordecoded blocks located adjacent to the current macroblock in the pictureto which the current macroblock belongs.
 6. The motion compensationmethod according to claim 1, wherein in the motion compensation step,the predictive image of the block in the current macroblock is generatedwith reference to a plurality of coded or decoded pictures.
 7. A picturecoding method for coding picture signals comprising: a selection step ofselecting one of methods for generating a motion vector of a block in acurrent macroblock to be coded, depending on a motion vector of a blocklocated in a corner of a coded macroblock among a group of blocks thatcompose the coded macroblock corresponding to the current macroblock; amotion compensation step of generating a predictive image of the blockin the current macroblock based on the motion vector generated by theselected method; and a coding step of coding a difference between theimage signal and the predictive image.
 8. A picture coding methodaccording to claim 7, wherein each block among the group of blocks is Nxpixels×Ny pixels in size where Nx and Ny are natural numbers, while thesize of the block in the current macroblock is Kx·Nx pixels×Ky·Ny pixelswhere Kx and Ky are natural numbers.
 9. A picture coding methodaccording to claim 8, wherein either one of Nx and Ny is a multiple ofthe other, and Kx·Nx≧8 and Ky·Ny≧8.
 10. A picture decoding method fordecoding a bit stream and obtaining a decoded picture, the picturedecoding method comprising: a selection step of selecting one of methodsfor generating a motion vector of a block in a current macroblock to bedecoded, depending on a motion vector of a block located in a corner ofa decoded macroblock among a group of blocks that compose the decodedmacroblock corresponding to the current macroblock; a motioncompensation step of generating a predictive image of the block in thecurrent macroblock based on the motion vector generated by the selectedmethod; and a decoding step of adding a difference image obtained bydecoding the bit stream and the predictive image to obtain a decodedpicture.
 11. A picture decoding method according to claim 10, whereineach block among the group of blocks is Nx pixels×Ny pixels in sizewhere Nx and Ny are natural numbers, while the size of the block in thecurrent macroblock is Kx·Nx pixels×Ky·Ny pixels where Kx and Ky arenatural numbers.
 12. A picture decoding method according to claim 11,wherein either one of Nx and Ny is a multiple of the other, and Kx·Nx≧8and Ky·Ny≧8.
 13. A program for motion-compensating an image signalcausing a computer to execute: a selection step of selecting one ofmethods for generating a motion vector of a block in a currentmacroblock to be coded or decoded, depending on a motion vector of ablock located in a corner of a coded or decoded macroblock among a groupof blocks that compose the coded or decoded macroblock corresponding tothe current macroblock; and a motion compensation step of generating apredictive image of the block in the current macroblock based on themotion vector generated by the selected method.
 14. A program for codingan image signal causing a computer to execute: a selection step ofselecting one of methods for generating a motion vector of a block in acurrent macroblock to be coded, depending on a motion vector of a blocklocated in a corner of a coded macroblock among a group of blocks thatcompose the coded macroblock corresponding to the current macroblock; amotion compensation step of generating a predictive image of the blockin the current macroblock based on the motion vector generated by theselected method; and a coding step of coding a difference between theimage signal and the predictive image.
 15. A program for decoding a bitstream and obtaining a decoded picture causing a computer to execute: aselection step of selecting one of methods for generating a motionvector of a block in a current macroblock to be decoded, depending on amotion vector of a block located in a corner of a decoded macroblockamong a group of blocks that compose the decoded macroblockcorresponding to the current macroblock; a motion compensation step ofgenerating a predictive image of the block in the current macroblockbased on the motion vector generated by the selected method; and adecoding step of adding a difference image obtained by decoding the bitstream and the predictive image to obtain a decoded picture.
 16. Apicture coding apparatus for coding an image signal, comprising: aselection unit operable to select one of methods for generating a motionvector of a block in a current macroblock to be coded, depending on amotion vector of a block located in a corner of a coded macroblock amonga group of blocks that compose the coded macroblock corresponding to thecurrent macroblock; a motion compensation unit operable to generate apredictive image of the block in the current macroblock based on themotion vector generated by the selected method; and a coding unitoperable to code a difference between the image signal and thepredictive image.
 17. A picture decoding apparatus for decoding a bitstream and obtaining a decoded picture comprising: a selection unitoperable to select one of methods for generating a motion vector of ablock in a current macroblock to be decoded, depending on a motionvector of a block located in a corner of a decoded macroblock among agroup of blocks that compose the decoded macroblock corresponding to thecurrent macro block; a motion compensation unit operable to generate apredictive image of the block in the current macroblock based on themotion vector generated by the selected method; and a decoding unitoperable to add a difference image obtained by decoding the bit streamand the predictive image to obtain a decoded picture.